﻿using System;
using System.Collections.Generic;
using System.Text;
using Cemit.PolyProto;
using Google.Protobuf;

namespace Cemit.PolyServer.Game
{
    public class CreateRoomHandle : IAsyncGetHandle<Msg_Game_CreateRoom>
    {
        public IMessage Execute(G message)
        {
            int roomId = GameServer.Instance.CreateRoom(this.AsMessage(message).Player);
            return new Msg_Game_RoomId { Index = roomId };
        }
    }
}
